#ifndef _MAINFORM_H_
#define _MAINFORM_H_

#include <FBase.h>
#include <FUi.h>
#include <FUix.h>
#include  <FLocations.h>

using namespace Osp::Locations::Services;
using namespace Osp::Base::Collection;

class MainForm :
	public Osp::Ui::Controls::Form,
	public Osp::Ui::IActionEventListener,
	public Osp::Uix::IWeatherEventListener,
	public Osp::Locations::ILocationListener
{

// Construction
public:
	MainForm(void);
	virtual ~MainForm(void);
	bool Initialize(void);

// Implementation
protected:
	static const int ID_BUTTON_OK = 101;
	static const int ID_EGY = 102;
	static const int ID_KETTO = 103;

	Osp::Ui::Controls::Button *__pButtonOk;
	Osp::Ui::Controls::Label *__pFokLabel;
	Osp::Ui::Controls::Label *__pVarosLabel;
	Osp::Ui::Controls::Label *__pCondLabel;
	Osp::Ui::Controls::Label *__pSzelLabel;
	Osp::Ui::Controls::Label *__pRealLabel;
	Osp::Uix::WeatherSensor weathersensor;
	Osp::Ui::Controls::List *__pMyList;

	Osp::Ui::Controls::ScrollPanel *__pScrollPanel1;
	Osp::Ui::Controls::ScrollPanel *__pScrollPanel2;

	Osp::Locations::LocationProvider *locProvider;

	float longitude, latitude;

public:
	virtual result OnInitializing(void);
	virtual result OnTerminating(void);
	virtual void OnActionPerformed(const Osp::Ui::Control& source, int actionId);

	void OnCurrentWeatherReceived(Osp::Uix::CurrentWeather& currentWeather, result r);
	void OnWeatherForecastReceived(Osp::Base::Collection::IList *pWeatherForecastList, result r);

	void OnLocationUpdated(Osp::Locations::Location& location);
	void OnProviderStateChanged(Osp::Locations::LocProviderState newState);
};

#endif	//_MAINFORM_H_
